<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is index page">
<title>浙江在线保险网</title>
<style type="text/css">
<!--
a:link {text-decoration: none;color: blue} 
a:active {text-decoration:blink} 
a:hover {text-decoration:underline;color: green}  
a:visited {text-decoration: none;color: blue} 
.nav11 {font-size:14px; font-weight:bold; color:#FFF;}
.nav12 {font-size:13px; color: #666;}
.lid {font-size:12px; color: #FFF;}
.wb {font-size:16px; font-weight:bold; font-style:oblique; color: #FF9307;}
.wb2 {font-size:15px; color: #535353;}
.wb3 {font-size:12px; color: #A8A8A8;}
.wb4 {font-size:14px; color: #666;}
.but {font-size:14px;color: #FFF;background-repeat: no-repeat;}
.b1 {font-size:15px; font-family:"黑体", "微软雅黑"; color: #535353;}
.b2 {font-size:14px; color: #999;}
.h {font-size:15px; font-family:"黑体", "微软雅黑"; color: #F35300;}
.h2 {border-bottom:#999 1px dotted;}
.h3 {font-size:13px; font-family:"黑体", "微软雅黑"; color: #666;}
.h4 {font-size:13px; font-family:"黑体", "微软雅黑"; color:#FFF;}
.h5 {font-size:13px; font-family:"黑体", "微软雅黑"; color: #F35300;}
.h6 {font-size:13px; color: #666;}
.h7 {font-size:15px; font-family:"黑体", "微软雅黑"; font-weight:bold; color: #535353;}
.h8 {font-size:15px; font-family:"黑体", "微软雅黑"; font-weight:bold; font-style:oblique; color: #F30;}
-->
</style>
<script src="<%=request.getContextPath()%>/js/jquery-1.3.2.min.js" src="<%=request.getContextPath()%>/js/jquery-1.3.2.min.js"></script>  
<script type="text/javascript">
<!--  
$(document).ready(function() {  
             ClearErrorInfo();  
                   $("#loginSubmit").click(function() {  
                     ClearErrorInfo();  
                     var flag=true;  
                     var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;  
          if($.trim($("#memberid").val())==""){  
              $("#memberIdError").html("<font color='red'>用户名不能为空！</font>");  
              flag=false;  
                      }  
          if($.trim($("#username").val())==""){  
              $("#userNameError").html("<font color='red'>姓名不能为空！</font>");  
              flag=false;  
                      }  
          if($.trim($("#memberpass").val())==""){  
              $("#passError").html("<font color='red'>密码不能为空！</font>");  
              flag=false;  
                      }else{  
                             if($.trim($("#memberpass").val())!=$.trim($("#memberpass2").val())){  
                                 $("#passError2").html("<font color='red'>两次密码不一致！</font>");  
                                 flag=false;  
                                        }  
                      }  
                       
          if($.trim($("#gender").val())==""){  
              $("#genderError").html("<font color='red'>性别不能为空！</font>");  
              flag=false;  
                      }  
                     var email=$.trim($("#email").val());  
          if(email==""){  
              $("#emailError").html("<font color='red'>电子邮箱不能为空！</font>");  
              flag=false;  
                      }else{  
                               var isOk=reg.test(email);  
               if(!isOk){  
                        $("#emailError").html("<font color='red'>电子邮箱格式不正确！</font>");  
               }  
                      }  
          if($.trim($("#birthday").val())==""){  
              $("#birthdayError").html("<font color='red'>出生日期不能为空！</font>");  
              flag=false;  
                      }  
                   return flag;  
         });      
   
                   $("#memberid").blur(function() {  
          $.post("CheckMemberId", { memberid:$("#memberid").val()},  
                                    function (data, textStatus){  
                                     if(data.isMemberIdUsed=="yes"){  
                                              $("#memberIdError").html("<font color='red'>用户名已经被注册，请重新选择一个！</font>");  
                                     }  
                                    }, "json");  
                   });  
    function ClearErrorInfo(){  
             $("#memberIdError").html("");  
             $("#userNameError").html("");  
             $("#passError").html("");  
             $("#passError2").html("");  
             $("#genderError").html("");  
             $("#emailError").html("");  
             $("#birthdayError").html("");  
    }  
                    
});  
// -->
</script>  
</head>  

<body>
<div style="width:903px; margin:46px auto;"> 
 <div style="width:903px; height:52px;">
  <div style="width:126px; height:52px; overflow:hidden; float:left;"><img src="<%=request.getContextPath()%>/images/1.jpg"  /></div>
  <div style="width:764px; height:52px; overflow:hidden; margin-left:10px; float:left;"><img src="<%=request.getContextPath()%>/images/2.jpg" width="765" /></div>
 </div>
 <div class="nav11" style="width:893px; height:33px; line-height:33px; padding-left:10px; overflow:hidden; background-repeat:no-repeat; background-image:url(<%=request.getContextPath()%>/images/3.jpg); float:left;">
 <a href ="<%=request.getContextPath()%>/home/index!index.do">首页</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/question/indexQuestion!index.do" target="_blank">问吧</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/product/indexProduct!index.do" target="_blank">保险产品</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/agent/indexAgent!index.do" target="_blank">找营销员</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/caze/indexCaze!index.do" target="_blank">保险案例</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/agent/loginAgent!loginUI.do" target="_blank">营销员专区</a>
 &nbsp;&nbsp;&nbsp;&nbsp; <a href ="<%=request.getContextPath()%>/user/loginUser!loginUI.do" target="_blank">用户登录</a>
 </div>
 <div class="nav12" style="width:873px; height:28px; line-height:28px; padding-left:30px; background-image:url(<%=request.getContextPath()%>/images/4.jpg); overflow:hidden; float:left;">
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=0 " target="_blank">重大疾病</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=1 " target="_blank">商业医疗</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=2 " target="_blank">商业养老</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=3 " target="_blank">分红保险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=4 " target="_blank">万能保险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=5 " target="_blank">投资连结</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=6 " target="_blank">少儿保险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=7 " target="_blank">女性保险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=8 " target="_blank">旅游保险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=9 " target="_blank">定期寿险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=10" target="_blank">终身寿险</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 <a href ="<%=request.getContextPath()%>/product/listByType!type.do?type=11" target="_blank">意外保险</a></div>
 
  <s:form action="add" namespace="/agent" onsubmit='return checkform();'>
  
<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">用户名:</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  <s:textfield name="agent.userName"/>
  <span id="userNameError"></span>
  <span id="usernameError"></span></div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">登录密码：</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:password name="agent.password"/>
  <span id="passwordError"></span></div>
  
  <div style="width:291px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/35.png);">
  </div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">确认密码：</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:password name="passwords"/>
  <span id="passwordsError"></span></div>
  
  <div style="width:291px; height:27px; float:left; "></div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">真实姓名：</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:textfield name="agent.name"/>
  <span id="nameError"></span></div>
  
  <div style="width:291px; height:27px; float:left; "></div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">联系方式：</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:textfield name="agent.phone"/>
  <span id="phone"></span></div>
  
  <div style="width:291px; height:27px; float:left; "></div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">邮  箱:</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:textfield name="agent.email" size="24"/>
  <span id="emailError"></span></div>
  
  <div style="width:291px; height:27px; float:left; "></div>
</div>

<div style="width:655px; height:22px; line-height:22px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:22px; float:left;">地  区：</div>
  
  <div style="width:86px; height:22px; float:left;">
      <s:select list="#{'':'请选择所在地区','0':'杭州','1':'宁波','2':'温州','3':'嘉兴',
   		'4':'湖州','5':'绍兴','6':'金华','7':'衢州','8':'舟山',
   		'9':'台州','10':'丽水'}" name="agent.area" label="地区"/>
  
  <span id="areaError"></span></div>
  
  <div style="width:291px; height:22px; float:left; "></div>
</div>

<div style="width:655px; height:22px; line-height:22px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:22px; float:left;">所属公司:</div>
  <div style="width:86px; height:22px; float:left;">
      <s:select name="agent.companyName" list="#request.companys" listValue="companyName" 
   		listKey="companyName" label="保险公司"></s:select>
  
  <span id="companyNameError"></span></div>
  <div style="width:291px; height:22px; float:left; "></div>
</div>

<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  <div class="h5" style="width:71px; height:27px; float:left;">资格证号：</div>
  <div style="width:286px; height:27px; float:left; background-image:url(<%=request.getContextPath()%>/images/33.png);">
  
  <s:textfield name="agent.qualityNumber"/>
  <span id="qualityNumberError"></span></div>
  
  <div style="width:291px; height:27px; float:left; "></div>
</div>

	
<div style="width:655px; height:27px; line-height:27px; padding-left:46px; float:left; margin:15px 0px 0px 0px;">
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <input type="submit" value="注册" id="loginSubmit" onclick="validatorloginName();"/>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <input type="reset" value="重填" />
  <div class="h5" style="width:71px; height:27px; float:left;"></div>
  
</div>
	
   </s:form>
   </div>
   
  </body>
  
</html>
